<?php 
	get_header();
	$post_obj = $wp_query->get_queried_object();
	$area = get_taxonomy($post_obj->taxonomy);;
?>
		<div class="wrapper-content">
			<div class="content arquivo">
				<span class="clear"></span>
				<h1 class="title-post">Mostrando todos os Posts em <?php echo $area->labels->name; ?> de: <?php echo $post_obj->name; ?></h1>
				<ul class="resultado-de-busca-lista">
					<?php 
						$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
						$query_posts = new WP_Query('cat='.$post_obj->cat_ID.'&posts_per_page=10&paged=' . $paged);
						if ( $query_posts->have_posts() ) :  while (  $query_posts->have_posts() ) : $query_posts-> the_post(); 
						$class = has_post_thumbnail() ? '' : 'class="no-image"';
						?>
						<ul class="posts-recentes">
							<li class="<?php echo $class; ?>">
								<div class="wrapper-img"><?php the_post_thumbnail( 'posts-recents' ); ?></div>
								<div class="wrapper-texto wrapper-texto-busca">
									<h3 class="categoria"><?php $category = get_the_category(); foreach ($category as $category) { echo $category->cat_name . '   ' ; }  ?></h3>
									<h3 class="titulo"><?php echo get_the_title(); ?></h3>
									<p>
									<?php
										$conteudo = get_the_content();
										echo resumo($conteudo, 400);
									?>
									</p>
									<a href="<?php echo get_permalink(); ?>" class="saibamais">Saiba +</a>
									<span class="clear"></span>
								</div>
								<span class="clear"></span>
							</li>
						</ul>
						<?php endwhile; ?>
						<?php else : ?>
							<li>
								<span class="tit-post-resultado">Nenhum resultado encontrado; </span>
							</li>
						<?php endif; ?>
						<span class="clear"></span>
				</ul>
				<div class="pagenavi"><?php wp_pagenavi( array( 'query' => $query_posts ) ); ?></div>
			</div>
		</div><!--/wrapper-content-->
	</div><!--/container-->
<?php get_footer(); ?>